<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$views_home}css/base.css"/>
		<link href="{$web_site}public/answer_editor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
	    <script type="text/javascript" src="{$web_site}public/answer_editor/third-party/jquery.min.js"></script>
	    <script type="text/javascript" src="{$web_site}public/answer_editor/third-party/template.min.js"></script>
	    <script type="text/javascript" charset="utf-8" src="{$web_site}public/answer_editor/umeditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="{$web_site}public/answer_editor/umeditor.min.js"></script>
	    <script type="text/javascript" src="{$web_site}public/answer_editor/lang/zh-cn/zh-cn.js"></script>
	    
		<style>
	/*************个人主页显示部分开始*************************/
		
		.personal{
			width:970px;
			min-height:495px;
			margin:0 auto;
			background: #fff;
			
		}
		
		.personal_top_button{
			width: 968px;
			height:55px;
			margin: 0 auto;
			
			border-bottom: 1px #ccc solid;	
		}
		.personal_top_button_post{
			width: 60px;
			height:35px;
			float:left;
			margin-left:20px;
			margin-top:10px;
			font-size:16px;
			color: #fff;
			background: #7B68EE;
			cursor: pointer;
		}

		.personal_top_button_rev{
			width: 60px;
			height:35px;
			float:left;
			margin-left:20px;
			margin-top:10px;
			font-size:16px;
			color: #fff;
			background: #7B68EE;
			cursor: pointer;

		}
		.personal_top_button_back{
			width: 68px;
			height:30px;
			float:left;
			margin-left:620px;
			margin-top:15px;
			color: #fff;
			background: #7B68EE;
			cursor: pointer;
		}
	/*****************管理权限操作 上 ******************/	

	.personal_top_control{
		width:960px;
		height:40px;
		background: #fff;
		margin:0 auto;
		margin-top:10px;
	}
	.personal_top_control_div1{
		width:60px;
		height:15px;
		float:left;
		background:#fff;
		margin-left: 10px;
		margin-top:15px;
		border-right:1px #ccc solid;
	}
	.personal_top_control_div2{
		width:33px;
		height:15px;
		float:left;
		background:#fff;
		margin-left: 10px;
		margin-top:15px;
		border-right:1px #ccc solid;
	}
	.personal_top_control_div3{
		width:33px;
		height:15px;
		float:left;
		background:#fff;
		margin-left: 10px;
		margin-top:15px;
		border-right:1px #ccc solid;
	}
	.personal_top_control_div4{
		width:33px;
		height:15px;
		float:left;
		background:#fff;
		margin-left: 10px;
		margin-top:15px;
		border-right:1px #ccc solid;
	}
	/***************主页主体 main 开始***********************/
		/*** ***********楼主部分开始**********************/	
		.personal_main{
			width:968px;
		
			background:#fff;
			border:3px #ccc solid;
			margin-top:10px;
		}

		/*********** main 左边 部分***************/
		.personal_main_left{
			width:168px;
			min-height:310px;
			background: #eff4f7;
			float:left;
			border:1px solid #ccc;
		}
		.personal_main_left_top{
			width:168px;
			height:75px;
		
			border-bottom:1px dashed #ccc;
		}
		.personal_main_left_top_tip{
			width:168px;
			height:40px;


		}

		.personal_main_left_top_tip1{
			width:60px;
			height:25px;
			float: left;
			margin-top:5px;
			margin-left:15px;
		
		}
		.personal_main_left_top_tip2{
			width:60px;
			height:25px;
			float: left;
			margin-top:5px;
			margin-left:2px;
			border-left:1px #ccc solid;
			padding-left:10px;
		}
		.personal_main_left_top_username{
			width:60px;
			height:30px;
			line-height:30px;
			font-weight:bold;
			
			margin-left:15px;
		
		}
		
		.personal_main_left_pic_tx{
			width:60px;
			height:60px;
			margin-left:40px;
			margin-top:20px;

		}
		.personal_main_left_pic_font1{
			color:red;
			margin-left:10px;
			margin-top:40px;
		}
		.personal_main_left_pic_font2{
			width:165px;
			height:40px;
			margin-left:10px;
			margin-top:10px;
		}

		/*********** main 右边 部分***************/
		.personal_main_right{
			width:778px;
			min-height:300px;
			background: #fff;
			margin-left:20px;
			float:left;
		}
		.personal_main_right_top{
			width:750px;
			height:75px;
			
			margin:0 auto;
			border-bottom:1px #ccc dashed;
		}
		.personal_main_right_top1{
			width:750px;
			height:45px;
			
			margin:0 auto;
		}
		.personal_main_right_top1_font{
			width:450px;
			height:45px;
			font-size:16px;
			font-weight:bold;
			margin-top:10px;
			float:left;
		}
		.personal_main_right_top1_next{
			width:50px;
			height:45px;
			float:right;
			margin-top:10px;
			
		}
		.personal_main_right_top2_time{
			width:300px;
			float:left;

		}
		
		.personal_main_right_top2_man{
			width:50px;
			float:left;
		
			margin-left:250px;
		}
		.personal_main_right_top2_form{
			float:left;
			width:100px;		
		}
	
		.personal_main_right_top2_form_put{	
			width:30px;
		}
		.personal_main_right_main{
			width:740px;
			min-height:190px;
			background:#fff;
			margin:0 auto;
			padding-top:20px;
			padding-left:10px;
			padding-bottom: 10px;
			border-bottom:1px #ccc dashed;
		}
		.personal_main_right_bottom{
			width:730px;
			height:40px;
			background: #fff;

		}
		.personal_main_right_bottom_left{
			width:130px;
			height:15px;
			float:left;
			background: #fff;
			margin-left:30px;
			margin-top:10px;
			
		}
		.personal_main_right_bottom_right{
			width:150px;
			height:20px;
			float:left;
			background: #fff;
			margin-left:400px;
			margin-top:10px;
		}

		.personal_main_right_bottom_right_div1{
			width:30px;
			height:15px;
			float:left;
			background:#fff;
			margin-left: 10px;
		}
		.personal_main_right_bottom_right_div2{
			width:30px;
			height:15px;
			float:left;
			border-left:1px #ccc solid;
			border-right:1px #ccc solid;
			margin-left: 10px;
			padding-left:7px;
			padding-right:3px;
			background:#fff;
		}
		.personal_main_right_bottom_right_div3{
			width:30px;
			height:15px;
			float:left;
			margin-left: 10px;
			background:#FFFFE0;
		}

		/*******************楼主部分结束*****************************/
		/***************楼层回复部分开始*******************************/
		.personal_floor{
			width:968px;
			min-height:330px;
			background:#fff;
			border:1px #ccc solid;
			margin-top:20px;
		}
		/***************************************/
		.personal_floor_left{
			width:168px;
			min-height:310px;
			background: #eff4f7;
			float:left;
			border:1px solid #ccc;
		}
		.personal_floor_left_top{
			width:168px;
			height:40px;
		
			border-bottom:1px dashed #ccc;
		}
		
		.personal_floor_left_top_username{
			width:60px;
			height:30px;
			line-height:40px;
			font-weight:bold;
			
			margin-left:15px;
		
		}
		
		.personal_floor_left_pic_tx{
			width:60px;
			height:60px;
			margin-left:20px;
			margin-top:20px;

		}
		.personal_floor_left_pic_font1{
			color:red;
			margin-left:20px;
			margin-top:45px;
		}
		.personal_floor_left_pic_font2{
			width:165px;
			height:40px;
			margin-left:10px;
			margin-top:10px;
		}



		/***********************************************************/
		.personal_floor_right{
			width:778px;
			min-height:300px;
			background: #fff;
			margin-left:20px;
			float:left;
		}
		.personal_floor_right_top2{
			width:750px;
			height:40px;
			margin:0 auto;
			border-bottom:1px #ccc dashed;
		}
		
		.personal_floor_right_top2_time{
			width:300px;
			height:20px;
			margin-top:15px;
			float:left;

		}
		
		.personal_floor_right_top2_man{
			width:50px;
			height:20px;
			float:left;
			margin-top:15px;
			margin-left:350px;
		}
		
		.personal_floor_right_main{
			width:740px;
			min-height:190px;
			background:#fff;
			margin:0 auto;
			padding-top:20px;
			padding-left:10px;
			padding-bottom: 10px;
			border-bottom:1px #ccc dashed;
		}
		.personal_floor_right_bottom{
			width:730px;
			height:40px;
			background: #fff;

		}
		.personal_floor_right_bottom_left{
			width:130px;
			height:15px;
			float:left;
			background: #fff;
			margin-left:30px;
			margin-top:10px;
			
		}
		.personal_floor_right_bottom_right{
			width:150px;
			height:20px;
			float:left;
			background: #fff;
			margin-left:400px;
			margin-top:10px;
		}

		.personal_floor_right_bottom_right_div1{
			width:30px;
			height:15px;
			float:left;
			background:#fff;
			margin-left: 10px;
		}
		.personal_floor_right_bottom_right_div2{
			width:30px;
			height:15px;
			float:left;
			border-left:1px #ccc solid;
			border-right:1px #ccc solid;
			margin-left: 10px;
			padding-left:7px;
			padding-right:3px;
			background:#fff;
		}
		.personal_floor_right_bottom_right_div3{
			width:30px;
			height:15px;
			float:left;
			margin-left: 10px;
			background:#fff;
		}

		/***************楼层回复部分结束***********************/
	/***************主页主体 main 结束*******************************/
		/**** ********下方发帖、回帖按钮开始*****************/
		.personal_bottom_button{
			width: 968px;
			height:55px;
			margin: 0 auto;
			
			border-bottom: 1px #ccc solid;	
		}
		.personal_bottom_button_post{
			width: 60px;
			height:35px;
			float:left;
			margin-left:20px;
			margin-top:10px;
			font-size:16px;
			color: #fff;
			background: #7B68EE;
			cursor: pointer;
		}

		.personal_bottom_button_rev{
			width: 60px;
			height:35px;
			float:left;
			margin-left:20px;
			margin-top:10px;
			font-size:16px;
			color: #fff;
			background: #7B68EE;
			cursor: pointer;
		}
		.personal_bottom_button_back{
			width: 68px;
			height:30px;
			float:left;
			margin-left:620px;
			margin-top:15px;
			color: #fff;
			background: #7B68EE;
			cursor: pointer;
		}
		

	/*************分页及跳转页面*****************************/
		.personal_page{
				width:968px;
				height:40px;
				background: #fff;
				margin:0 auto;
			}
			.personal_page_put1{
				width:20px;
				float: left;
				margin-left: 350px;
				margin-top: 15px;
			}
			.personal_page_put2{
				margin-top: 15px;
				float: left;
			}
			.personal_page_p{
				margin-top: 15px;
				float: left;
			}
			.personal_page_p a,.personal_page_p span{
				margin-top: 15px;
				margin-left: 15px;
			}

	/*************个人主页显示部分结束********************/
		/**************** 底部 分页 ********************/
			.personal_page{
				width:778px;
				height:30px;
				
			}
			.personal_page_put1{
				width:20px;
				float: left;
				margin-left: 130px;

			}
			.personal_page_put2{
			
				float: left;
			}
			.personal_page_p{
				width:;
				float: left;
			}
			.personal_page_p a,.personal_page_p span{
				margin-left: 15px;
			}

		/*****************结束*************************/
	/**************回帖部分开始*****************************/
			.personl_answer{
				width:968px;
				
				margin:0 auto;
				margin-top:20px;
				background: #fff;
				border:1px #ccc solid;
			}

			.personl_answer_left{
				width:168px;
				min-height:370px;
				background: #eff4f7;
				float:left;
				border:1px #ccc solid;
			}
			
			.personl_answer_right{
				width:780px;
				min-height:200px;
				background:#fff;
				float:left;
				margin-left: 18px;
				
			}
			.personl_answer_right_text{
				width:740px;
				margin-top:20px;
				margin-left:10px;
			}
			
			
			.personl_answer_right_button input{
				width: 80px;
				height:35px;
				
				margin-left:20px;
				margin-top:10px;
				font-size:16px;
				color: #fff;
				background: #7B68EE;
				cursor: pointer;
			}
		/***************回帖部分结束***************************/
		</style>
	</head>
	<body>
		<!--********个人主页显示部分开始***********************-->
		{if $res_person2}
			{foreach $res_person2 as $k => $v}
		<div class="personal">
			<div class="personal_top_button clearFix">
				<a href="{$web_site}post.php?classid={$v['classid']}">
					<input class="personal_top_button_post" type="submit" value="发帖">
				</a>
				<a href="{$web_site}personal.php?id={$v['id']}#target">
					<input class="personal_top_button_rev" type="submit" value="回复">
				</a>
				<a href="{$web_site}public.php?classid={$v['classid']}">
					<input class="personal_top_button_back" type="submit" value="返回列表">
				</a>

				
			</div>
			<!--  置顶 删除~~~~  -->
			{if $res_person1[0]['usertype'] == 1}
			<div class="personal_top_control clearFix">
				<div class="personal_top_control_div1"><a href="{$admin_home}personal.php?id={$v['id']}&isdel=1">删除主题</a></div>
				<div class="personal_top_control_div2"><a href="{$admin_home}personal.php?id={$v['id']}&istop=1">置顶</a></div>
				<div class="personal_top_control_div3"><a href="{$admin_home}personal.php?id={$v['id']}&ishot=1">高亮</a></div>
				<div class="personal_top_control_div4"><a href="{$admin_home}personal.php?id={$v['id']}&elite=1">精华</a></div>
			</div>
			{/if}
			<!-- *********主页主体 main 开始*****************-->
			
			<div class="personal_main clearFix">

					<!-- 	main 左边 部分   -->
				<div class="personal_main_left">
					<div class="personal_main_left_top">
						<div class="personal_main_left_top_tip clearFix">
							<div class="personal_main_left_top_tip1">查看：{$v['hits']}</div>

							<div class="personal_main_left_top_tip2">回复：{$v['replycount']}</div>
						</div>
						<div class="personal_main_left_top_username"><a href"{$web_site}personal.php">{$res_person1[0]['username']}</a></div>
					</div>
					<div class="personal_main_left_pic">
						<div class="personal_main_left_pic_tx"><img style="width:80px; height:80px;" src="{$web_site}{$res_person1[0]['picture']}"></div>
						<div class="personal_main_left_pic_font1">{$user=$res_person1[0]['usertype']==1?'管理员':'普通用户'}</div>
						<div class="personal_main_left_pic_font2 clearFix">
							<p style="width:30px;height:35px;float:left;color:red;">等级:{$levname}</p>
							<img style="width:100px; height:40px;float:left;margin-left:10px;" src="{$web_site}{$res_lev2[0]['lpicture']}">
							<div style="width:120px;height:40px;margin:0 auto;line-height:40px;"><span>距下一级还差&nbsp;<span style="margin:0 auto;color:red;">{$gd=($res_lev2[0]['grade']-$grade0+100)}&nbsp;</span>积分</div>
						</div>
					</div>
				</div>

					<!--  main 右边 部分   -->
				<div class="personal_main_right">
					<div class="personal_main_right_top">
						<div class="personal_main_right_top1 clearFix">

							<div class="personal_main_right_top1_font">{$v['title']}</div>
							<div class="personal_main_right_top1_next">|>></div>
						</div>
						<div class="personal_main_right_top2 clearFix">
						
							<div class="personal_main_right_top2_time">发表于&nbsp;{$addtime=(str_replace('0','',date('H',time()) - date('H',$v['addtime'])))>0?str_replace('0','',date('H',time()) - date('H',$v['addtime'])):0}&nbsp;小时之前</div>
							
							<div class="personal_main_right_top2_man">楼主</div>
							<div class="personal_main_right_top2_form">
								<form action="" method="" enctype="multipart/form-data">
									直达<input class="personal_main_right_top2_form_put" type="text" name="" value="">
								</form>
							</div>
						</div>

					</div>

					<div class="personal_main_right_main">
						{$v['content']}
					</div>
					<div class="personal_main_right_bottom clearFix">
						<div class="personal_main_right_bottom_left">
							<a href="{$web_site}personal.php?id={$v['id']}#target">回复</a>
						</div>
						{if $res_person1[0]['usertype'] == 1}
						<div class="personal_main_right_bottom_right clearFix">
								<div class="personal_main_right_bottom_right_div1"><a href="{$admin_home}personal.php?id={$v['id']}&isdel=1">删除</a></div>
								<div class="personal_main_right_bottom_right_div2"><a href="{$admin_home}personal.php?id={$v['id']}&istop=1">置顶</a></div>
								<div class="personal_main_right_bottom_right_div3"><a href="{$admin_home}personal.php?id={$v['id']}&elite=1">精华</a></div>
						</div>
						{/if}
					</div>
				</div>		
			</div>
		
			<!-- *********主页主体 main 结束*****************-->
			<!--  ***********	回复楼层信息	************  -->

			{if $res_person3}
				{foreach $res_person3 as $k => $v}
				{if $v['tid'] == $id}
					
			<div class="personal_floor clearFix">

				<!--  楼层回复左边    -->
				
				
				<div class="personal_floor_left">
				{foreach $rows4 as $k4 => $v4}
				{foreach $v4 as $k44 => $v44}
				{if $v['authorid'] == $v44['uid']}
					
					<div class="personal_floor_left_top">
						<div class="personal_floor_left_top_username"><a href="{$web_site}personal.php">{$v44['username']}</a></div>
					</div>
					{/if}
					{/foreach}
					{/foreach}
					
					
					<div class="personal_floor_left_pic">
						{foreach $rows4 as $k4 => $v4}
						{foreach $v4 as $k44 => $v44}
						{if $v['authorid'] == $v44['uid']}
						<div class="personal_floor_left_pic_tx"><img style="width:80px; height:80px;" src="{$web_site}{$v44['picture']}"></div>
						<div class="personal_floor_left_pic_font1">{$user4=$v44['usertype']==1?'管理员':'普通用户'}</div>
						{/if}
						{/foreach}
						{/foreach}


						{foreach $rows5 as $k5 => $v5}

						{foreach $v5 as $k55 => $v55}
						
						{if $v44['grade'] > $v55['grade'] && $v44['grade'] <= $v55['grade'] + 100}
						<div class="personal_floor_left_pic_font2 clearFix">
							<p style="width:30px;height:35px;float:left;color:red;">等级:{$v55['levname']}</p>
							<img style="width:100px; height:40px;float:left;margin-left:10px;" src="{$web_site}{$v55['lpicture']}">
							<div style="width:120px;height:40px;margin:0 auto;line-height:40px;"><span>距下一级还差&nbsp;<span style="margin:0 auto;color:red;">{$gd4=($v55['grade']-$v44['grade']+100)}&nbsp;</span>积分</div>
						</div>
							{/if}
						{/foreach}
				{/foreach}
						
					</div>
					
		
				</div>
				
									<!--  楼层回复右边    -->
				
				<div class="personal_floor_right">
					<div class="personal_floor_right_top">
						
						<div class="personal_floor_right_top2 clearFix">
						
							<div class="personal_floor_right_top2_time">发表于&nbsp;{$addtime=(str_replace('0','',date('H',time()) - date('H',$v['addtime'])))>0?(date('H',time()) - date('H',$v['addtime'])):0}&nbsp;小时之前</div>
							
							<div class="personal_floor_right_top2_man">沙发</div>
							
						</div>

					</div>

					<div class="personal_floor_right_main">
						{$v['content']}
					</div>
					<div class="personal_floor_right_bottom clearFix">
						<div class="personal_floor_right_bottom_left">
							<a href="{$web_site}personal.php?id={$v['id']}#target">回复</a>
						</div>
						<div class="personal_floor_right_bottom_right clearFix">
								<div class="personal_floor_right_bottom_right_div1"><a href="">删除</a></div>
								<div class="personal_floor_right_bottom_right_div2"><a href="">置顶</a></div>
								<div class="personal_floor_right_bottom_right_div3"><a href="">屏蔽</a></div>
						</div>

					</div>


				</div>
					
			</div>	
			
					{/if}
				{/foreach}
			{/if}
			<!-- ****** 个人主页显示部分结束  *********-->

			<!--  ******下方发帖、回帖按钮**************  -->
			<div class="personal_bottom_button clearFix">
				<a href="{$web_site}post.php?classid={$v['classid']}">
					<input class="personal_bottom_button_post" type="submit" value="发帖">
				</a>
				<a href="{$web_site}personal.php?id={$v['id']}#target">
					<input class="personal_bottom_button_rev" type="submit" value="回复">
				</a>
				<a href="{$web_site}public.php?classid={$v['classid']}">
					<input class="personal_bottom_button_back" type="submit" value="返回列表">
				</a>

				
			</div>


		<!-- *************** 分页展示部分 ***************-->

				<div class="personal_page clearFix">
			
					<form action="{$web_site}personal.php?page={$page}&id={$v['id']}" method="get" enctype="multipart/form-data">
						<input type="hidden" name="id" value="{$v['id']}">
						<input class="personal_page_put1" type="text" value="{$page=($page<1 || $page>$pageTotal)?1:$page}"    name="page">
						<input class="personal_page_put2" type="submit" value="GO">
						
					</form>
					<p class="personal_page_p">
						<a href="{$web_site}personal.php?page=1&tid={$v['id']}&id={$res_person2[0]['id']}">首页</a>
					<a href="{$web_site}personal.php?page={$prev}&tid={$v['id']}&id={$res_person2[0]['id']}">上一页</a>
						<a href="{$web_site}personal.php?page={$next}&tid={$v['id']}&id={$res_person2[0]['id']}">下一页</a>
						<a href="{$web_site}personal.php?page={$pageTotal}&tid={$v['id']}&id={$res_person2[0]['id']}">尾页</a>
						<span>共有{$total}条记录</span>
						<span>每页显示{$num}条</span>
						<span>本页显示{$offset+1}-{$offset+$num}条</span>
						<span>{$page}/{$pageTotal}页</span>
					</p>
				</div>
	
		</div>
			{/foreach}
			{/if}
		

		<!--*************************************************-->
		<!--*************************************************-->

		<!-- **********回帖部分开始 ***********************-->
		<div class="personl_answer clearFix">
			<!-- 回帖 左边 部分  -->
			<div class="personl_answer_left">
				<div class="personal_main_left_pic_tx"><img style="width:80px; height:80px;" src="{$web_site}{$res_person1[0]['picture']}"></div>
				<div class="personal_main_left_pic_font1">{$user=$res_person1[0]['usertype']==1?'管理员':'普通用户'}</div>
				<div class="personal_main_left_pic_font2 clearFix">
					<p style="width:30px;height:35px;float:left;color:red;">等级:{$levname}</p>
					<img style="width:100px; height:40px;float:left;margin-left:10px;" src="{$web_site}{$res_lev2[0]['lpicture']}">
					<div style="width:120px;height:40px;margin:0 auto;line-height:40px;"><span>距下一级还差&nbsp;<span style="margin:0 auto;color:red;">{$gd=($res_lev2[0]['grade']-$grade0+100)}&nbsp;</span>积分</div>
				</div>

			</div>

			<!-- 回帖 右边 部分  -->
			<div class="personl_answer_right">
				<form action="{$admin_home}person_reply.php?id={$res_person2[0]['id']}" method="post" enctype="multipart/form-data">
					<div class="personl_answer_right_text">
											
						<!--style给定宽度可以影响编辑器的最终宽度-->
						<script type="text/plain" id="myEditor" name="reply" style="width:750px;height:240px;margin:0 auto;">
						    <p>生活不止眼前的苟且，还有成千上万条代码要写</p>
						</script>
						<script type="text/javascript">
						    //实例化编辑器
						    var um = UM.getEditor('myEditor');   
						</script>
					</div>

					<div class="personl_answer_right_button">
						<a name="target"></a>
		<!--<a href="{$admin_home}person_reply.php?id=148">		-->
							<input type="hidden" name="id" value="{$res_person2[0]['id']}">
							<input type="submit" value="发表回复">
			<!--	</a> -->
					</div>
				</form>
			</div>
		</div>
		<!-- ***********回帖部分结束************************-->
	</body>
</html>